<script>


function use_current_account (item)
{
    $('input[name=accountType]').val($(item).attr('accountType'));
    $('input[name=accountUserName]').val($(item).attr('accountUserName'));
    $('input[name=accountName]').val($(item).attr('accountName'));
}

function bank_reload_banklist ()
{
    $.get('/bank/list', function (o) {
        if (o.status == 0)
        {
            $('.bankList').html(o.html);
        }
    }, 'json');
}

function layer_open_new (item)
{
    layer.open({
        type : 2
        ,title: '添加新的收款账户'
        ,content: '/bank/create'
        ,area: ['480px', '480px']
    });
}

function create_succ_prize_tips (method, url, data)
{
    var index = layer.load(0);

    if (! method) method = 'GET';

    if (method == 'GET')
    {
        $.get(url, function (o) {
            layer.close(index);
            layer.open({
                type : 1,
                title: false,
                //closeBtn: 0,
                shadeClose: true,
                content: $('.prizeTips'),
            });
        }, 'json');
    }
    else
    {
        $.post(url, data, function (o) {
            layer.close(index);
            if (o.message)
                layer.msg(o.message);
            else
                layer.msg('系统错误，请重试');
        }, 'json');
    }
}



<{if $step == 'price'}>
	// 计算总服务费和总其他费用
	$(function () {

	    $('input[name=priceService]').change(function () { auto_adjust_total_price(); });
	    $('input[name=priceTraffic]').change(function () { auto_adjust_total_price(); });
	    $('input[name=priceTicket]').change(function () { auto_adjust_total_price(); });
	    $('input[name=priceFood]').change(function () { auto_adjust_total_price(); });
	    $('input[name=priceOther]').change(function () { auto_adjust_total_price(); });

	    auto_adjust_total_price ();
	});

	function auto_adjust_total_price ()
	{
	    pTraffic = parseFloat($('input[name=priceTraffic]').val());
	    pTicket  = parseFloat($('input[name=priceTicket]').val());
	    pFood    = parseFloat($('input[name=priceFood]').val());
	    pService = parseFloat($('input[name=priceService]').val());
	    pOther   = parseFloat($('input[name=priceOther]').val());

        totalFee = pTraffic + pTicket + pFood + pOther; // + pService;
	    $('input[name=priceTotal]').val(totalFee + pService);
	    $('input[name=priceService2]').val(pService);

        $('.priceall').html(totalFee + '€');
        $('.pricefuwu').html(pService + '€');
	}
<{/if}>
</script>
